home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Oberon⁄F™ 1.1 / Obx / Docu / BlackBox (.txt) < prev    next >
Encoding:
Oberon Document  |  1995-08-16  |  4.4 KB  |  58 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. Helvetica
  17. Helvetica
  18. StdLinks.LinkDesc
  19. StdCmds.OpenBrowser('Obx/Docu/BBRules', 'BlackBox rules')
  20. Helvetica
  21. StdCmds.OpenDoc('System/Rsrc/Menus')
  22. TextRulers.StdRulerDesc
  23. TextRulers.RulerDesc
  24. TextRulers.StdStyleDesc
  25. TextRulers.StyleDesc
  26. TextRulers.AttributesDesc
  27. Helvetica
  28. Helvetica
  29. MENU "BlackBox" ("ObxBlackBox.ViewDesc")
  30.     "Show Solution"    ""    "ObxBlackBox.ShowSolution"    "ObxBlackBox.ShowSolutionGuard"
  31.     SEPARATOR
  32.     "New Atoms"    ""    "ObxBlackBox.New"    ""
  33.     "Set New Atoms"    ""    "ObxBlackBox.Set"    ""
  34.     SEPARATOR
  35.     "Rules"    ""    "StdCmds.OpenBrowser('Obx/Docu/BBRules')"    ""
  36. TextControllers.StdCtrlDesc
  37. TextControllers.ControllerDesc
  38. Containers.ControllerDesc
  39. Controllers.ControllerDesc
  40. Helvetica
  41. StdCmds.OpenBrowser('Obx/Docu/BBRules', 'BlackBox rules')
  42. DevCommanders.StdViewDesc
  43. DevCommanders.ViewDesc
  44. StdCmds.OpenDoc('Obx/Mod/BlackBox')
  45. Oberon by Example: ObxBlackBox
  46. This example implements the deductive game BlackBox, using the black-box framework Oberon/F. The aim of the game is to guess the positions of atoms within an n by n grid by firing rays into a black box. The rays may be deflected or even be absorbed. From the position where the ray leaves the grid one must try to deduce the position of the atoms. For more information about BlackBox and on how to play the game read the 
  47. rules
  48. A main point of this example is to demonstrate one advantage of compound documents: The ObxBlackBox views which are implemented can directly be used in the documentation for illustration purposes. Neither additional code nor the use of a drawing program is required. Moreover, these views in the documentation are living elements and can be inspected and modified as desired.
  49. This example also shows how a view-specific menu can be used. If a BlackBox view is the focus view, a special menu appears which offers BlackBox-specific commands that operate on the focus view. For this purpose the following menu should be installed into your menu file (-> 
  50. Menus
  51. The first menu entry is enabled or disabled depending on the state of the focus view. A user-defined guard is added for this purpose. For more information about the commands themselves see the section on how to play BlackBox in the 
  52. rules
  53.  "StdCmds.OpenAuxDialog('Obx/Rsrc/BlackBox', 'BlackBox')"
  54. ObxBlackBox
  55. sources
  56. Helvetica
  57. Documents.ControllerDesc
  58.